home *** CD-ROM | disk | FTP | other *** search
- Path: bloom-beacon.mit.edu!news.media.mit.edu!uhog.mit.edu!europa.eng.gtefsd.com!howland.reston.ans.net!cs.utexas.edu!news.tamu.edu!sgi-faq
- From: sgi-faq@viz.tamu.edu (The SGI FAQ group)
- Newsgroups: comp.sys.sgi.misc,comp.answers,news.answers
- Subject: SGI graphics Frequently Asked Questions (FAQ)
- Supersedes: <graphics_764182743@viz.tamu.edu>
- Followup-To: comp.sys.sgi.misc
- Date: 6 Apr 1994 20:11:56 GMT
- Organization: Visualization Lab, Texas A&M University
- Lines: 1660
- Approved: news-answers-request@mit.edu
- Expires: 4 May 1994 20:11:14 GMT
- Message-ID: <graphics_765663074@viz.tamu.edu>
- Reply-To: sgi-faq@viz.tamu.edu (The SGI FAQ group)
- NNTP-Posting-Host: viz.tamu.edu
- Originator: sgi-faq@viz
- Xref: bloom-beacon.mit.edu comp.sys.sgi.misc:9367 comp.answers:4794 news.answers:17744
-
- Archive-name: sgi/faq/graphics
- Last-modified: Wed Mar 9 16:12:38 CST 1994
-
- SGI graphics Frequently Asked Questions (FAQ)
-
- This is one of the Silicon Graphics FAQ series, which consists of:
-
- SGI admin FAQ - IRIX system administration
- SGI apps FAQ - Applications & compilers
- SGI graphics FAQ - Graphics and user environment customization
- SGI hardware FAQ - Hardware
- SGI misc FAQ - Introduction & miscellaneous information
- SGI performer FAQ - IRIS Performer
- SGI pointer FAQ - Pointer to the other FAQs
-
- Read the misc FAQ for information about the FAQs themselves. Each FAQ
- is posted to comp.sys.sgi.misc and to the news.answers and comp.answers
- newsgroups (whose purpose is to store FAQs) twice per month. If you
- can't find one of the FAQs with your news program, you can get it by
- anonymous FTP from one of these sites:
-
- rtfm.mit.edu:/pub/usenet/comp.sys.sgi.misc/
- rtfm.mit.edu:/pub/usenet/news.answers/sgi/faq/
- rtfm.mit.edu:/pub/usenet/comp.answers/sgi/faq/
- viz.tamu.edu:/pub/sgi/faq/
-
- Note that rtfm.mit.edu is home to many other FAQs and informational
- documents, and is a good place to look if you can't find an answer
- here. If you can't use FTP, send mail to mail-server@rtfm.mit.edu with
- the command 'send usenet/news.answers/ftp-list/faq' on a line by itself
- in the text, and it will send you a document describing how to FTP by
- mail. You can also read a hypertext version of the FAQs at
-
- http://www.cis.ohio-state.edu/hypertext/faq/usenet/sgi/top.html
-
- The SGI FAQs are freely distributable and wide circulation is encouraged.
- The contents are accurate as far as we know, but the usual disclaimers
- apply. Please send additions and changes to sgi-faq@viz.tamu.edu.
-
- Topics covered in this FAQ:
- ---------------------------
- -1- What books about the X Window System and OSF/Motif do you
- recommend?
- -2- Sun XView applications like "mailtool" hang my X server in 4.0.5.
- They come up fine, but as soon as I click on them the server
- freezes.
- -3- Why am I getting DGL errors when I try to display a GL program?
- -4- After running a few programs, the colors change as the cursor
- moves. The colors are usually all wrong in other windows.
- -5- How can I change my X Server to use a 12-bit PseudoColor, 12-bit
- TrueColor, or 24-bit TrueColor visual by default?
- -6- Why doesn't my X server use backing store? How can I turn it on?
- -7- The library /usr/lib/libgl_s.a isn't on my R4000 Indigo. Where is
- it?
- -8- How do I run a program on one machine and display it on another?
- -9- Does the DISPLAY environment variable work for GL applications?
- -10- The DISPLAY variable doesn't seem to work. Why?
- -11- Can I save my screen layout?
- -12- Sometimes an extra 4Dwm is running, using a lot of the CPU. Is
- this necessary?
- -13- I'm running IRIX 4.0.1, and can't log in correctly. After logging
- in the screen turns blue then goes back to Pandora.
- -14- How do I run 'xinit' manually, (not automatically from 'xdm')?
- -15- How do I start X on a remote host with no users logged in?
- -16- What do the errors in my 'xdm-errors' file mean?
- -17- How do I log into pandora without bringing up graphics?
- -18- How do I start and stop the graphics system?
- -19- How can I kill the X server without logging in or rebooting?
- -20- Pandora won't come up, and /usr/adm/SYSLOG says "helvetica font
- missing"
- -21- How do I restart the console?
- -22- What are resources?
- -23- How do I set resources?
- -24- How do I know what resources I can set for an application?
- -25- How do I run the same program twice with different attributes?
- -26- Does the GL recognize resources?
- -27- How can I emulate a Meta key using xwsh?
- -28- How do I find out what fonts are available?
- -29- Does SGI provide any tools to help with the customization
- process?
- -30- What is a good approach to take in looking for resources?
- -31- What is the precedence for resource files?
- -32- What files affect the window manager and what is their
- relationship to each other?
- -33- Do I need my own .4Dwmrc file?
- -34- Can I run different window managers?
- -35- How do I choose a different window manager as the default?
- -36- Where can I learn more about the Window Manager behavior?
- -37- How do I recover from a failed window manager customization
- attempt?
- -38- What is the difference between .xsession and .sgisession?
- -39- After copying /usr/lib/X11/xdm/Xsession to .xsession, I can't log
- in.
- -40- What are the important login and resource files for IRIX 4D1-4.0?
- -41- What is the sequence of events that occur at login time?
- -42- Why do 4Dwm, toolchest, Workspace, etc. not recognize an
- environment variable I set in my shell's startup files?
- -43- Why doesn't the window manager's "Log Out" routine work?
- -44- Where is the default value of PATH set?
- -45- How can I convert RGB bitmaps to & from other formats?
- -46- Can I compress RGB bitmaps?
- -47- How do I make a screen dump?
- -48- Can I use 4Dgifts code in my application?
- -49- What does ERR_WMANIPC mean?
- -50- How can I translate screen (x,y) coords into world (x,y,z)
- coords?
- -51- How can I translate world (x,y,z) coords into screen (x,y)
- coords?
- -52- I call mapcolor(index, R, G, B) but nothing happens. Why?
- -53- What's wrong with blink()?
- -54- When I try to run UIM/X uxserverd, I get an error message saying,
- "license file has been modified, cannot start the UIM/X license
- server".
- -55- What is a GL widget?
- -56- I'm using the GlxMDraw widget and it doesn't seem that colors are
- being installed correctly. Overlays in the GlxMDraw widget are
- displayed in red and gray instead of the colors I specify. What
- is the problem?
- -57- I get a "Broken Pipe" error when I close the window of an X
- client, such as xman or xterm. What does this error mean? Is
- there something wrong with my system?
- -58- Is there a way to switch on the fly between single and double
- buffering within a GL widget?
- -59- Why doesn't SGI's xlock lock my screen?
- -60- What about Inventor?
- -61- Why do I get compilation errors when compiling the Inventor C++
- examples, using C++ 3.0?
- -62- Why does the X server sometimes abort when I log out in IRIX
- 5.0.1 and IRIX 5.1?
-
- ----------------------------------------------------------------------
-
- Subject: -1- What books about the X Window System and OSF/Motif do
- you recommend?
- Date: 07 May 93 00:00:01 EST
-
- Introductory Texts on the X Window System
-
- - O'Reilly and Associates Inc., "The Definitive Guides to the X Window
- System", by Valerie Quercia and Tim O'Reilly. Vol. 3, "X Window
- System User's Guide", Sebastopol, CA., 1988, 1989.
-
- Discusses being an end user of the X window system. Covers topics
- like window manages, font specifications, standard X clients and
- resources.
-
- Texts on X Window System Programming
-
- - O'Reilly and Associates, Inc. "The Definitive Guides to the X Window
- System", by Adrian Nye. Vol. 1, "Xlib Programming Manual",
- Sebastopol, CA, 1990.
-
- Contains the introductory elements for programming with the Xlib, the
- lowest level of the X window system. Discusses concepts such as X
- color capacities, windows, events, drawing primitives.
-
- - Young, Douglas A., "X Window Systems Programming and Applications
- wit Edition). Prentice Hall. Englewood Cliffs, NJ.
- 1990.
-
- A thorough book starting with the basics of programming with a
- toolkit though advanced topics. Contains source code for several
- small complete applications. (Source code for this book is also
- available on line in the /usr/src directory of the Motif Development
- option.)
-
- - O'Reilly and Associates Inc., "The Definitive Guides to the X Window
- System", by Adrian Nye and Tim O'Reilly. Vol. 4, "X Toolkit
- Intrinsics Programming Manual", Sebastopol, CA., 1990.
-
- Another reference for programming with the OSF/Motif toolkit. Covers
- topics including basic programming, widgets, resources, and more
- advanced topics.
-
- Reference Texts for the X Window System :
-
- - O'Reilly and Associates Inc., "The Definitive Guides to the X Window
- System", by Adrian Nye. Vol. 2, "Xlib Reference Manual", Sebastopol,
- CA., 1988.
-
- Complete reference for Xlib library routines.
-
- - Scheifler, Robert and James Gettys, X Window System, Second Edition,
- Digital Press, 1990. ISBN 1-55558-050-5.
-
- Referred to as "the Bible" of Xlib and X Protocol reference.
-
- Reference Texts for the OSF/Motif Toolkit :
-
- - Open Software Foundation, "OSF/Motif Programmer's Guide". Release
- 1.1, Prentice Hall. Englewood Cliffs, NJ. 1990.
-
- Exhaustive reference of every widget in the OSF/Motif library.
-
- - Asente, Paul J. and Ralph R. Swick. "X Window System Toolkit".
- X Version 11, Release 4. Digital Press. 1990.
-
- Very in-depth reference to the structure and operation of
- an X window system toolkit.
-
- ------------------------------
-
- Subject: -2- Sun XView applications like "mailtool" hang my X server
- in 4.0.5. They come up fine, but as soon as I click on
- them the server freezes.
- Date: 07 May 93 00:00:01 EST
-
- Any XView application run under the Xsgi X11-server shipped in
- IRIX versions 4.0.5A through 4.0.5G will lock the X Server on
- the first mouse click and will not release it until killed from
- somewhere else. Fortunately there is a workaround:
-
- a) Run the application with '-Wfsdb' on the command line.
- Alternatively you could use '-fullscreendebug'. For example:
-
- % mailtool -Wfsdb
-
- b) If you have the sources, add
-
- extern int fullscreendebug;
-
- before main() and
-
- fullscreendebug = 1;
-
- after the xv_init() call. This forces the program to set this flag
- in any case - even when run with non-SGI X servers. It releases you
- of the danger of omitting -Wfsdb and locking your screen.
-
- c) if the program uses the 'fullscreen' package, you might add
-
- Fullscreen.Debug: True
-
- in $HOME/.Xresources or specify this resource on the command line.
- This flag currently disables grabs in both the 'window' and the
- 'fullscreen' package, but is only set from resources in the
- 'fullscreen' package.
-
- ------------------------------
-
- Subject: -3- Why am I getting DGL errors when I try to display a GL
- program?
- Date: 20 Feb 94 00:00:01 EST
-
- - You may be trying to display on a non-SGI machine which doesn't have
- GL/DGL. (Most don't, yet.) Presently the only way around this is to
- buy a third-party GL emulator for the non-SGI machine.
-
- - DGL may be disabled in /etc/services and/or /usr/etc/inetd.conf
- (/etc/inetd.conf in IRIX 5.x). The former file should have a line
- reading
-
- sgi-dgl 5232/tcp
-
- and the latter should have a line reading
-
- sgi-dgl stream tcp nowait root /usr/etc/dgld dgld -IM -tDGLTSOCKET
-
- If either is commented out, remove the comment.
-
- - You may be trying to display on a machine with a much older version
- of IRIX. Try another machine with a newer IRIX.
-
- - You may have set the DISPLAY enviroment variable incorrectly.
-
- - The machine on which you're displaying may have disallowed access.
- Do 'xhost +yourmachine' to give 'yourmachine' access to the display.
-
- An article in the Jan/Feb 93 Pipeline describes the above in great
- detail.
-
- ------------------------------
-
- Subject: -4- After running a few programs, the colors change as the
- cursor moves. The colors are usually all wrong in other
- windows.
- Date: 07 May 93 00:00:01 EST
-
- This is known as colormap flashing. It is caused by the server
- maintaining 2 separate colormaps, one for GL windows and one for X
- windows. As the cursor moves around, the window manager will install
- the correct colormap for each window. This will cause colors to be
- wrong in other windows. For more information on colormaps and
- installation please see the Xlib Programming manual, chapter 7 (Vol I
- of the O'Reilly series).
-
- You can sometimes avoid colormap flashing by configuring your X Server
- to use a 12-bit or 24-bit visual by default.
-
- ------------------------------
-
- Subject: -5- How can I change my X Server to use a 12-bit
- PseudoColor, 12-bit TrueColor, or 24-bit TrueColor
- visual by default?
- Date: 07 May 93 00:00:01 EST
-
- By default, the SGI X Server is configured to use an 8-bit PseudoColor
- visual. X-based applications can request other visuals directly if
- they are available. Alternatively, you can change the default visual
- by performing the following steps:
-
- a) Run "/usr/bin/X11/xdpyinfo" and check that your server is
- capable of using a 12-bit or 24-bit visual. If it is,
- you will see lines similar to the following:
-
- visual id, max buffers, depth: 0x28, 0, 12
- visual id, max buffers, depth: 0x29, 0, 12
- visual id, max buffers, depth: 0x2a, 0, 24
-
- The last number on each line represents the number of
- bits available for that visual.
-
- b) Log in as root
-
- c) Edit the file /usr/lib/X11/xdm/Xservers. By default it
- will contain the string:
- :0 secure /usr/bin/X11/X -bs -c -pseudomap 4sight
- for a 24-bit TrueColor visual change it to:
- :0 secure /usr/bin/X11/X -bs -c -class TrueColor -depth 24
- for a 12-bit PseudoColor visual change it to:
- :0 secure /usr/bin/X11/X -bs -c -class PseudoColor -depth 12
-
- d) Restart your X server. You can do this by invoking either
- of the following commands:
-
- % killall -TERM Xsgi
-
- % /usr/gfx/stopgfx; /usr/gfx/startgfx
-
- Note: X Server visuals are an advanced topic; before making the above
- changes you should be aware that some 3rd-party and freeware
- applications might not gracefully adapt to an X Server which supplies
- anything but an 8-bit PseudoColor visual by default.
-
- ------------------------------
-
- Subject: -6- Why doesn't my X server use backing store? How can I
- turn it on?
- Date: 12 Feb 94 00:00:01 EST
-
- Mark Kilgard of SGI <mjk@hoot.asd.sgi.com> writes,
- SGI ships its X server with backing store disabled. If you edit
- /usr/lib/X11/xdm/Xservers and remove the -bs option, then restart the X
- server, backing store will be available.
-
- The reason for not turning on backing store by default is two-fold.
-
- 1) In IRIX 4.0.X the code for managing overlay planes didn't properly
- take overlays into account so backing store doesn't work if you have
- overlay windows on the screen. This is fixed n IRIX 5.x.
-
- 2) In most cases, backing store hurts your performance. It cases ALL X
- rendering operations to make an extra (small) traversal through
- backing store code even if backing store isn't in use. Also when
- backing store is in use, it tends to grow the X server since a large
- amount of memory can easily be used to maintain backing store.
-
- One alternative to backing store is to render your image to a pixmap
- and then blit from the pixmap to the screen in response to expose
- events. This will stress the X server a great deal less than using
- backing store. Additionally, make sure you are compressing expose
- events when you redraw.
-
- ------------------------------
-
- Subject: -7- The library /usr/lib/libgl_s.a isn't on my R4000 Indigo.
- Where is it?
- Date: 07 May 93 00:00:01 EST
-
- It's in the "maint" software, in the maint_gl_x_dev package.
-
- ------------------------------
-
- Subject: -8- How do I run a program on one machine and display it on
- another?
- Date: 07 May 93 00:00:01 EST
-
- Use the DISPLAY environment variable to specify the remote host on
- whdisplayed; then invoke the
- appplication.
-
- To specify the remote host,
-
- setenv DISPLAY <destination>:0
-
- where <destination> is the name or IP address of the remote host.
- To specify the local host (console),
-
- setenv DISPLAY :0
-
- ------------------------------
-
- Subject: -9- Does the DISPLAY environment variable work for GL
- applications?
- Date: 07 May 93 00:00:01 EST
-
- Yes. Iris GL programs display on the machine specified by the DISPLAY
- environment variable. This occurs because the GL now uses the
- Distributed Graphics Library (DGL) capabilities by default. It is
- important to remember that only Silicon Graphics' machines can display
- GL. For networks running NIS (formerly yellow pages), it is sometimes
- necessary to add the flag "-lsun" when compiling.
-
- ------------------------------
-
- Subject: -10- The DISPLAY variable doesn't seem to work. Why?
- Date: 07 May 93 00:00:01 EST
-
- There are several possibilities. First, check your DISPLAY variable to
- make sure it is syntactically correct. For example, to display
- applications on a machine named "enterprise" whose IP address is
- 123.45.678.90, it should be set to "enterprise:0" or
- "123.45.678.90:0".
-
- Also, try to "ping" the machine to which your DISPLAY variable is set.
- If this does not work, you have either specified an invalid hostname,
- the host is down, or you are having network problems.
-
- Sometimes, when trying to display to a remote server, you see messages
- like "permission denied" or "can't connect to server". To solve
- permission problems, you need to disable access control on the remote
- server using the xhost command. By default, access control is disabled
- on Silicon Graphics' machines.
-
- For more information see Chapter 3 of the X Window System User's Guide,
- (Vol. 3 of the O'Reilly series)
-
- If NIS is used, make sure the client is linked with "-lsun".
-
- ------------------------------
-
- Subject: -11- Can I save my screen layout?
- Date: 07 May 93 00:00:01 EST
-
- Not very easily. You must run "xwininfo" to find the X and Y position
- of each window, then use that information to customize your .sgisession
- or .xsession files.
-
- For more information see Chapter 3 of the X Window System User's Guide,
- (Vol. 3 of the O'Reilly series)
-
- There are two tools that may help: 'xtoolplaces', which was posted to
- volume 14 of comp.sources.x
- (ftp.uu.net:/usenet/comp.sources.x/volume14/xtoolplaces/), and David
- Hinds' 'xscript', which is at cb-iris.stanford.edu:/pub/.
-
- ------------------------------
-
- Subject: -12- Sometimes an extra 4Dwm is running, using a lot of the
- CPU. Is this necessary?
- Date: 07 May 93 00:00:01 EST
-
- No, there should only be one. This multiple window manager problem
- usually is triggered by the "kill" feedback of the window manager when
- a user logs out. The workaround for the problem is to remove the
- "kill" feedback.
-
- The "kill" feedback is controlled by the resource "showFeedback." For
- 4Dwm, this resource is defined in /usr/lib/X11/app-defaults/4DWm as:
-
- *showFeedback: behavior restart quit kill
-
- Modify the resource to read:
-
- *showFeedback: behavior restart quit
-
- For mwm, set a "showFeedback" resource that does not include the "kill"
- feedback in /usr/lib/X11/app-defaults/Mwm. A sample setting is:
-
- Mwm*showFeedback: move placement resize behavior restart quit
-
- ------------------------------
-
- Subject: -13- I'm running IRIX 4.0.1, and can't log in correctly.
- After logging in the screen turns blue then goes back to
- Pandora.
- Date: 07 May 93 00:00:01 EST
-
- The problem is caused by an incorrect shutdown. When you log out, xdm
- runs /usr/sbin/gamma and writes the current value to
- /etc/config/system.glGammaVal. IRIX buffers this data in main memory
- in the buffer cache. If the system is powered off right after logout,
- the data is not written to the file.
-
- a) Login to your system as root, either via the network or
- by taking the machine down to single-user mode.
-
- b) enter these commands at the # prompt:
-
- # cd /etc/config
- # cat system.glGammaVal
-
- If the cat command returns a value of 1.7000, contact your technical
- support provider for additional troubleshooting. If the command
- returns nothing (empty file) or "0", it means the problem can be fixed
- by entering the following command:
-
- # /bin/rm system.glGammaVal
- # /bin/echo "1.7" > system.glGammaVal
-
- Check your work:
-
- # cat system.glGammaVal
-
- The command above should now return 1.7.
-
- Your login should now be successful. If you edited the file while
- Pandora was running, you'll find the first login attempt will fail, but
- any later attempts will be successful. After the first login attempt,
- Pandora will read in the correct gamma value.
-
- ------------------------------
-
- Subject: -14- How do I run 'xinit' manually, (not automatically from
- 'xdm')?
- Date: 07 May 93 00:00:01 EST
-
- Note that this change would affect all users.
-
- 1) log in as root
- 2) Type:
- /usr/gfx/stopgfx
- chkconfig xdm off.
- 3) all users need to copy /usr/bin/X11/X to their home directory
- (renaming the file to .xserverrc), removing the if test for
- windowsystem, OR be familiar enough with xinit to have an alternate
- command line.
- 4) transfer all startup programs from .xsession/.sgisession to .xinitrc.
- 5) the last program to start from .xinitrc must not exit. When this
- one exits, the session terminates.
-
- ------------------------------
-
- Subject: -15- How do I start X on a remote host with no users logged
- in?
- Date: 07 May 93 00:00:01 EST
-
- This example starts up an xclock on the remote system. The easy way to
- test this for now is to rlogin to the system and type the commands.
- Once something works you can write some shell scripts and use rsh to
- run them:
-
- hydra is being used to login to oscar and start graphics on oscar.
- oscar is displaying the pandora login when this is done:
-
- hydra 2% rlogin oscar -l root
- oscar 1# /usr/gfx/stopgfx (screen blanks)
- oscar 2# chkconfig windowsystem on
- oscar 3# setenv DISPLAY :0.0 (display on local screen)
- oscar 4# /usr/bin/X11/X & (start Xsgi)
- oscar 5# xclock & (clock is displayed)
-
- To clean up:
-
- oscar 6# /usr/gfx/stopgfx (screen blanks)
- oscar 7# /usr/gfx/startgfx (re-start pandora)
-
- ------------------------------
-
- Subject: -16- What do the errors in my 'xdm-errors' file mean?
- Date: 07 May 93 00:00:01 EST
-
- It depends on the error message, obviously. Some are:
-
- unable to load display mode, rnid = 196614, errno = 22
- Failed to unbind rn from clip, rnid = 3,errno = 22
- bogus window id in rrm request type(2)
-
- These are messages related to the communication between the rrm layer
- in the kernel and the X server. The messages usually occur when a GL
- window is being destroyed in a sequence that the X server did not
- expect. They are quite benign.
-
- ------------------------------
-
- Subject: -17- How do I log into pandora without bringing up graphics?
- Date: 07 May 93 00:00:01 EST
-
- In IRIX 3.3 you could specify the "NOGRAPHICS" option on the login
- screen. The "NOGRAPHICS" option has been replaced with the keyword
- "failsafe" that is typed after the users name on the login screen.
- However, this command no longer brings up a "textport" window without
- graphics. Instead, it now starts a single xwsh on the center of the
- screen with no window manager. Example login:
-
- login: root failsafe
-
- ------------------------------
-
- Subject: -18- How do I start and stop the graphics system?
- Date: 07 May 93 00:00:01 EST
-
- Use /usr/gfx/startgfx and /usr/gfx/stopgfx. Be aware that stopgfx will
- kill any active windows and log you out. Under IRIX 3.* use
- /etc/gl/restartgl.
-
- ------------------------------
-
- Subject: -19- How can I kill the X server without logging in or
- rebooting?
- Date: 22 Jan 94 00:00:01 EST
-
- Hold down the left-Control, left-Shift, F12 and keypad slash keys.
- This is fondly known as the "Vulcan Death Grip".
-
- ------------------------------
-
- Subject: -20- Pandora won't come up, and /usr/adm/SYSLOG says
- "helvetica font missing"
- Date: 07 May 93 00:00:01 EST
-
- It appears that the subsystem, "eoe2.sw.fonts" did not get loaded.
- Re-ie from 'inst':
-
- 1) type "inst" or boot the mini-root, as documented in Section 4.5
- of the "IRIS Software Installation Guide"
- 2) keep *
- 3) set neweroverride on
- 4) install eoe2.sw.fonts
- 5) exit
-
- ------------------------------
-
- Subject: -21- How do I restart the console?
- Date: 07 May 93 00:00:01 EST
-
- Use /usr/sbin/startconsole. In IRIX 3.*, use /etc/gl/startconsole.
-
- ------------------------------
-
- Subject: -22- What are resources?
- Date: 07 May 93 00:00:01 EST
-
- Basically, resources are "attributes" that control the look and feel of
- an application. Resources include color, fonts, size, location, and
- more. Resources can have a complex format for binding strengths.
-
- For a complete description of resources, including a description of
- "loose" and "tight" bindings, consult a book listed in the bibliography
- question.
-
- ------------------------------
-
- Subject: -23- How do I set resources?
- Date: 07 May 93 00:00:01 EST
-
- There are many ways to set resources. Resources may be listed in files
- or contained in a data base. Consult a book on X as well as the xrdb(1)
- manpage for detailed descriptions. Generally speaking, if xrdb is not
- used, resource files are specified through environment variables.
- "What is a good approach to take in looking for resources?" addresses
- the precedence of these files and variables.
-
- For some examples, see the file
- /usr/tutor/Customize/example.Xdefaults.
-
- ------------------------------
-
- Subject: -24- How do I know what resources I can set for an
- application?
- Date: 07 May 93 00:00:01 EST
-
- The most common place to find resource variables for a particular
- application is in the man page for that application.
-
- For example, take a look at the man page for `xwsh'. Look for the
- section heading called `RESOURCES'. This section lists each resource
- for `xwsh', and in some cases, the valid values for that resource.
-
- Also, many major applications are built on top of the Xt toolkit. There
- are standard resources that these applications recognize. For a more
- complete description, see one of the books on Xt listed in the
- bibliography.
-
- ------------------------------
-
- Subject: -25- How do I run the same program twice with different
- attributes?
- Date: 07 May 93 00:00:01 EST
-
- To accomplish this task, you need to take advantage of the "instance vs
- class" concept. This concept is explained further in most books on Xt.
-
- Many applications have a resource that lets you to give it a unique
- name. For example, from the xwsh man page :
-
- -name instance-name
- Provide a unique name for an xwsh window. This name becomes
- the instance name of the specific xwsh, with the class name
- always being "XWsh".
-
- Using the -name option allows you to give "names" to different
- instances of xwsh and assign different resources to each one. So if
- you want two different xwsh's with different resource sets, give them
- two different names, say howdymom and howdydoody, for example. Add the
- following to your ~/.Xdefaults file (if you use .Xdefaults) :
-
- howdymom*foreground: SeaGreen
- howdydoody*foreground: SGIBeet
-
- Now all you have to do is start them up :
-
- xwsh -name howdymom&
- xwsh -name howdydoody&
-
- ------------------------------
-
- Subject: -26- Does the GL recognize resources?
- Date: 07 May 93 00:00:01 EST
-
- Yes. In IRIX 4.0 and later, the GL responds to several X resources,
- allowing run-time control over some aspects of GL programs.
-
- The man page assumes you are somewhat familiar with X resources, if you
- are not, you should read some X documentation such as Volume 3 of the
- O'Reily X books.
-
- The GL uses resources names with the prefixes
-
- appname.gl. (instance prefix)
- Appname.GL. (class prefix)
-
- where appname and Appname are derived from the argument to the GL
- program's first call to winopen(3G) upper case.
-
- For complete information see the man page for GLRESOURCES.
-
- ------------------------------
-
- Subject: -27- How can I emulate a Meta key using xwsh?
- Date: 10 Dec 93 00:00:01 EST
-
- Shankar Unni <shankar@wpd.sgi.com> says:
- In order to have "Meta" keys with xwsh, you first need to set its
- keyboard type to "xlib" (the "raw" keyboard). Then, you need to bind
- all the ALT-combinations to your taste. Here is my personal
- app-defaults file for XWsh:
-
- ================== cut here ======================
-
- XWsh*keyboardType: xlib
-
- ! This determines what characters are treated as a "word" when doing a
- ! double-click. I have it set so that any character that is in a file-
- ! name or E-mail address (!%$*+-./@) is picked up as a word char.
- XWsh*CharClass:33:48,36-37:48,42-43:48,45-47:48,64:48,126:48
-
- XWsh*keyMapping2: \
- a(Alt_L): send("\033a"); \
- b(Alt_L): send("\033b"); \
- [etc ...]
- z(Alt_L): send("\033z"); \
- A(Alt_L,Shift_L): send("\033A"); \
- B(Alt_L,Shift_L): send("\033B"); \
- [etc ...]
- Z(Alt_L,Shift_L): send("\033Z"); \
- 0(Alt_L): send("\0330"); \
- 1(Alt_L): send("\0331"); \
- [etc ...]
- 9(Alt_L): send("\0339"); \
- period(Alt_L): send("\033."); \
- underscore(Alt_L,Shift_L): send("\033_"); \
- bracketleft(Alt_L): send("\033["); \
- asterisk(Alt_L,Shift_L): send("\033*"); \
- numbersign(Alt_L,Shift_L): send("\033#"); \
- less(Alt_L,Shift_L): send("\033<"); \
- equal(Alt_L): send("\033="); \
- greater(Alt_L,Shift_L): send("\033>"); \
- Escape(Alt_L): send("\033\033"); \
- BackSpace(Alt_L): send("\033\010"); \
- Return(Alt_L): send("\015\001");
-
- ================== cut here ======================
-
- ------------------------------
-
- Subject: -28- How do I find out what fonts are available?
- Date: 07 May 93 00:00:01 EST
-
- The xfontsel and xlsfonts utilities help you find appropriate fonts.
- xlsfonts lists the fonts; xfontsel provides an interface for selecting
- a desired font. To use xfontsel, choose "Font Names" from the
- Customization rollover menu in the Toolchest. Please see the man pages
- and the IRIS Utilities Guide for further information.
-
- ------------------------------
-
- Subject: -29- Does SGI provide any tools to help with the
- customization process?
- Date: 07 May 93 00:00:01 EST
-
- Yes. The Customization rollover menu in the Toolchest contains three
- entries: Window Info, Color Names, and Font Names. Please refer to the
- man pages on these commands for details: xfontsel, xlsfonts, xwininfo,
- xdpyinfo, xprop, appres, listres, and xrdb.
-
- Also, see the "WorkSpace User's Guide" and the example files in
- /usr/tutor/Customize.
-
- ------------------------------
-
- Subject: -30- What is a good approach to take in looking for
- resources?
- Date: 07 May 93 00:00:01 EST
-
- The following is a recommended list of steps to take when searching
- for a resource, binding, behavior, etc.
-
- 1) Look in the 4.0 Transition Guide.
- 2) Look in /usr/tutor/Customize.
- 3) Look in /usr/demos.
- 4) Look in ~4Dgifts. (Available with the development option.)
- 5) If the client you are interested in is a GL client, see the
- man page for GLRESOURCES.
- 6) Look in /usr/lib/X11/app-defaults/ClientName.
- 7) Look in /usr/lib/X11/system.* .
- 8) Look through the man page for the client you are interested in.
- 9) Look in O'Reilly & Associates Vol. III. It has many gems
- pertaining to standard X clients.
- 10) Look in the documentation that came with your application.
- 11) Look in the OSF Motif manuals.
- 12) Post to comp.windows.x if you can not find
- an answer using steps 1 through 11.
-
- ------------------------------
-
- Subject: -31- What is the precedence for resource files?
- Date: 07 May 93 00:00:01 EST
-
- The following list indicates the weight of set resources.
- Items at the top have the greatest weight.
-
- 1) Hard coded values for resources.
- 2) Command line arguments.
- 3) Resources pointed to by $XENVIRONMENT.
- 4) Resource values loaded into the Resource Data Base via xrdb.
- 5) Resources pointed to by other environment variables :
-
- IF $XUSERFILESEARCHPATH is set
-
- then it contains a list of directories to search.
-
- ELSE IF $XAPPLRESDIR is set
-
- it contains a single directory, and a short list of related
- directories (e.g. adjusted for language) is where resource
- files must be found.
-
- ELSE
-
- Look in a short list of places related to $HOME (e.g. language
- adjusted). This includes files in $HOME that have the name of the
- class of the application.
-
- 6) Resource values set in $HOME/.Xdefaults, provided that the
- RESOURCE_MANAGER property hasn't been set via the xrdb command.
- (see the third paragraph in the xrdb man page)
- 7) Values set in /usr/lib/X11/app-defaults/*.
- 8) Values set through through the application's fall back mechanism.
-
- ------------------------------
-
- Subject: -32- What files affect the window manager and what is their
- relationship to each other?
- Date: 07 May 93 00:00:01 EST
-
- 1) ~/.4Dwmrc, if you have one
- 2) /usr/lib/X11/system.4Dwmrc
- 3) /usr/bin/X11/4Dwm
- 4) /usr/lib/X11/app-defaults/4Dwm
- 5) ~/.Xdefaults (or wherever you set resources)
-
- When 4Dwm is started, it looks for ~/.4Dwmrc. If it does not exist, it
- looks at /usr/lib/X11/system.4Dwmrc. The definitions for button
- bindings, menus, etc are contained in these files. For a better
- description of bindings, look in /usr/tutor/Customize/example.4Dwmrc
- and /usr/people/ 4Dgifts/.4Dwmrc. Also see the man pages for 4Dwm.
-
- The resource set for the bindings will actually "choose" which binding
- definition is set.
-
- ------------------------------
-
- Subject: -33- Do I need my own .4Dwmrc file?
- Date: 07 May 93 00:00:01 EST
-
- Not necessarily. As mentioned in the previous question, actual bindings
- are determined by resource names. If there is a binding definition in
- /usr/lib/X11/system.4Dwmrc that you like, you may choose it by setting
- the appropriate resource.
-
- ------------------------------
-
- Subject: -34- Can I run different window managers?
- Date: 07 May 93 00:00:01 EST
-
- In Irix 4D1-4.0, you may choose 4Dwm, mwm, twm, or uwm. Note that GL
- programs are guaranteed to work only under 4Dwm.
-
- ------------------------------
-
- Subject: -35- How do I choose a different window manager as the
- default?
- Date: 07 May 93 00:00:01 EST
-
- You must use a .xsession file and explicitly invoke the window manager
- and any other applications you want to use, such as 'toolchest' and
- 'xwsh'.
-
- After making this change, you may only be able to log out by using the
- "Log Out" selection in the toolchest, or by executing
- /usr/bin/X11/endsession.
-
- Here are the contents of a sample .xsession file:
-
- xhost + &
- toolchest -name ToolChest > /dev/console 2&>1 &
- winterm -bg red &
- winterm -bg blue &
- mwm > /dev/console 2&>1 &
- /usr/bin/X11/reaper
-
- Note that 'reaper' is not put into the background. When 'reaper' exits
- you will be logged out.
-
- Alternatively, you can do the following steps:
-
- 1. cp /usr/lib/X11/xdm/Xsession ~/.xsession
-
- 2. Remove the lines in ~/.xsession that say:
-
- if [ -r $xsession -a "$0" != $xsession ]; then
- if [ -x $xsession ]; then
- exec $xsession
- else
- exec /bin/sh $xsession
- fi
- fi
-
- 3. Change the line that says
-
- /usr/bin/X11/4Dwm >/dev/console 2>&1 &
-
- to
-
- /usr/bin/X11/mwm > /dev/console 2>&1 &
-
- ------------------------------
-
- Subject: -36- Where can I learn more about the Window Manager
- behavior?
- Date: 07 May 93 00:00:01 EST
-
- The man pages for 4Dwm and mwm contain a wealth of information on the
- window manager. There are also online files. You may want to read
- /usr/tutor/Customize/example.4Dwmrc as well as
- /usr/people/4Dgifts/.4Dwmrc (if you have the IDO option). The
- OSF/Motif manuals listed in the bibliography are also good places to
- find information. (4Dwm is based on mwm).
-
- ------------------------------
-
- Subject: -37- How do I recover from a failed window manager
- customization attempt?
- Date: 07 May 93 00:00:01 EST
-
- If your attempt at customization leaves you in a state where buttons
- and menus are no longer recognized, you can recover by pressing the
- <Alt><CTRL><Shift><!>keys simultaneously. A menu appears that will let
- you choose Motif, Iris, or user defaults. Choose either Motif or Iris
- defaults and then push OK. This restarts the window manager to a usable
- state.
-
- ------------------------------
-
- Subject: -38- What is the difference between .xsession and
- .sgisession?
- Date: 07 May 93 00:00:01 EST
-
- The system Xsession file (/usr/lib/X11/xdm/Xsession or Xsession-remote)
- starts up a number of important things when you log in, eg. 4Dwm,
- toolchest, loads resources, sets your XUSERFILESEARCHPATH, sets your
- root background, etc.
-
- One of the last things it does is look in your home directory for a
- .sgisession file. This allows you to start additional programs at
- login time. This is the file that you would use to start a mailbox,
- additional window, a calendar, etc.
-
- ADVANTAGES OF $HOME/.sgisession :
-
- 1) You don't need to read through yet another system file to see
- what you need or don't need.
-
- 2) You can override some of the defaults the system default has
- given you.
-
- DISADVANTAGES OF $HOME/.sgisession :
-
- 1) You cannot override ALL of the defaults set for you.
-
- 2) Some things you can't change from a .sgisession file :
-
- A) You can't start a different window manager.
- B) You can't change the way the console starts.
- C) You can't change toolchest output redirection to
- the console.
-
- 3) Users of other vendors' equipment are used to seeing a .xsession
- file.
-
- After checking for a "failsafe" (ie. no graphics) login, one of the
- first things that /usr/lib/X11/xdm/Xsession does is check for
- $HOME/.xsession. If it exists, Xsession will exec your .xsession
- file. This means that if you are REALLY sure you know what you are
- doing, you can login with a different window manager, xterm as a
- console, or xwsh not already iconified, etc. You can also turn off the
- toolchest output redirection, and start anything else you might have
- done in $HOME/.sgisession. There is a discussion on xsession files in
- volume 3 of the O'Reilly series.
-
- This next part might be redundant
-
- From the login event sequence mentioned earlier, you will note that
- /usr/lib/X11/xdm/Xsession tries to exec $HOME/.xsession if it exists.
- This is how you would go about changing programs started by default. An
- example is the start of the window manager. There is a discussion on
- xsession files in volume 3 of the O'Reilly series. For examples of
- alternate xsession files look at /usr/people/4Dgifts/.xsession or
- /usr/demos/.xsession.
-
- If you don't have a $HOME/.xsession file, /usr/lib/X11/xdm/Xsession
- starts things for you and eventually looks for $HOME/.sgisession. This
- is a good way to start additional programs without changing what is
- started by default.
-
- ------------------------------
-
- Subject: -39- After copying /usr/lib/X11/xdm/Xsession to .xsession, I
- can't log in.
- Date: 07 May 93 00:00:01 EST
-
- After copying this file to your home directory, you need to remove all
- references to "xsession". References to xsession cause the system to
- try to execute $HOME/.xsession, which will create an infinite loop.
-
- Remove the lines in ~/.xsession that say:
-
- if [ -r $xsession -a "$0" != $xsession ]; then
- if [ -x $xsession ]; then
- exec $xsession
- else
- exec /bin/sh $xsession
- fi
- fi
-
- ------------------------------
-
- Subject: -40- What are the important login and resource files for IRIX
- 4D1-4.0?
- Date: 07 May 93 00:00:01 EST
-
- The following three file groupings indicate where files that affect
- your login session reside.
-
- 1) /usr/lib/X11/* - This is THE starting place. Here you find the
- system default bindings for Motif, 4Dwm, and the Toolchest. The xdm
- directory lives here as well as the app-defaults directory. xdm
- controls the session management.Many application defaults are set in
- the app-defaults directory.
-
- 2) $HOME/[.Xdefaults, .4Dwmrc, .chestrc, .xsession, .sgisession] Here
- you find the files that control your system set-up. You create these
- files; they don't exist when you first log in.
-
- 3) /usr/bin/X11 - This is where the binaries live. It makes life nice
- to include this directory in your path.
-
- ------------------------------
-
- Subject: -41- What is the sequence of events that occur at login time?
- Date: 10 Dec 93 00:00:01 EST
-
- This synopsis of the events that occur when
- you log in to the console via xdm (xdm is the default method
- of logging in).
-
- 1) Provide a "failsafe" (nographics) login if required/requested.
- 2) Exec $HOME/.xsession if it exists. If it exists, the remaining
- steps should normally be included in the users .xsession file as
- well.
- 3) Load $HOME/.Xresources if it exists.
- 4) Set XUSERFILESEARCHPATH.
- 5) Incorporate a "shell" environment
- into the "session". (man userenv)
- 6) Set the root background and cursor.
- 7) Disable display access control (xhost +). (man xhost)
- 8) Start 4Dwm.
- 9) Wait for 4Dwm to come up.
- 10) Start the console.
- 11) Execute $HOME/.sgisession if it exists.
- 12) Start WorkSpace if the user wants it.
- 13) Put a Toolchest on each screen.
- 14) Exec the "reaper". (man reaper / endsession)
-
- ------------------------------
-
- Subject: -42- Why do 4Dwm, toolchest, Workspace, etc. not recognize an
- environment variable I set in my shell's startup files?
- Date: 06 Mar 94 00:00:01 EST
-
- The script /usr/lib/X11/xdm/Xsession (or, if you have one, your own
- ~/.xsession) runs when you log in and starts your window manager
- (4Dwm), Workspace, etc. To give these programs a copy of the
- environment you define in your shell's startup files, Xsession first
- runs 'userenv', which runs your shell just to see what environment
- variables your shell's startup files set and puts them into Xsession's
- environment. Later on Xsession runs 4Dwm, Workspace, etc. and they
- inherit Xsession's environment including the environment variables
- which 'userenv' got from your shell's startup files.
-
- However, 'userenv' objects to 1) errors in your shell startup files, 2)
- commands which print output to the terminal and 3) commands like 'stty'
- and 'tset', which expect to be connected to a terminal. Any of these
- may cause 'userenv' to give up completely, so that Xsession, 4Dwm,
- Workspace, etc. do not get any of your shell's enviroment.
-
- To get 'userenv' to work, you must 1) make sure that your shell startup
- files are error-free and 2) protect 'userenv' from commands which print
- output or expect to be connected to a terminal by testing for the
- ENVONLY environment variable before running them. (See the userenv(1)
- manpage.) You might try disabling your shell startup files (or parts
- thereof) one by one to narrow down which is causing the problem. Be
- sure to check both personal and system-wide shell startup files! See
- your shell's manpage for a complete list.
-
- Note that each terminal window (aka 'winterm', 'xwsh' or 'xterm') runs
- a fresh copy of your shell, so it has a second chance to set your
- environment variables. Your shell is now connected to a terminal and
- 'userenv' isn't involved, so none of the above problems apply. The
- environment in a terminal window will appear correct, and programs
- started from a window (e.g. by typing 'workspace' to start Workspace)
- will inherit the environment properly. Furthermore, 'userenv' often
- appears to work when run inside a terminal window, even when it does
- not work when run from Xsession. This is all fine, but it doesn't help
- when you log in. One right way to see if 'userenv' is working when it
- should is to add the line 'env > $HOME/test-userenv' to Xsession after
- the line that runs 'userenv', log in and examine the file it creates.
-
- ------------------------------
-
- Subject: -43- Why doesn't the window manager's "Log Out" routine work?
- Date: 09 Jan 94 00:00:01 CST
-
- "Log Out" runs 'endsession', which under some versions of IRIX 4.0.5
- does not work if your hostname contains a number. Fortunately, 'endsession'
- is a script, and you can fix it by changing the line
-
- PROP_DISPLAY=`expr $DISPLAY : '\(.*\).[1-9]' \| $DISPLAY`
-
- to
-
- PROP_DISPLAY=`expr $DISPLAY : '\(.*\)\.[1-9]' \| $DISPLAY`
-
- i.e. just add a backslash before the second period.
-
- ------------------------------
-
- Subject: -44- Where is the default value of PATH set?
- Date: 10 Dec 93 00:00:01 EST
-
- Every program which allows a user to log in (telnet, rlogin, pandora,
- etc.) can specify PATH. Shells may as well if it isn't already set.
- There are many slightly different default values, and relying on them
- is a good way to get confused. The only reliable method is to set PATH
- in your shell's startup files. These are different for each shell, and
- are described in each shell's manpage. Beware of 'ksh', which has an
- internal, invisible default path ('/bin:/usr/bin') which it uses when
- PATH is not set.
-
- ------------------------------
-
- Subject: -45- How can I convert RGB bitmaps to & from other formats?
- Date: 22 Feb 94 00:00:01 EST
-
- Several bitmap conversion tools are shipped with IRIX. The executables
- are part of the eoe2.sw.imagetools subsystem, and include:
-
- fromalias - convert an Alias image to an IRIS image
- frombin - create an RGB IRIS image file from a binary dump of image data
- fromcmap - convert a color map into an image with one scanline
- fromcube - convert a Cubicomp/Vertigo image file to IRIS format
- fromdi - convert an old .di dithered image into an IRIS image
- fromface - convert a UNIX faceserver image into an IRIS image
- fromgif - convert a GIF image into an IRIS image
- frommac - convert a MacPaint image into an IRIS image
- frompic - convert a MOVIE BYU .PIC image to an IRIS image
- fromppm - convert an image in Jef Poskanzer's format into an IRIS image
- fromrla - convert a Wavefront image to an IRIS image
- fromsun - convert a sun image into an IRIS image
- fromtarga - convert a targa image into an IRIS image
- fromxbm - convert an X Bitmap image into an IRIS image
- fromxud - convert an xwd file into an IRIS image
- fromxwd - convert an xwd file into an IRIS image
- fromyuv - convert an Abekas yuv image into an IRIS image
- toalias - convert an IRIS image to an Alias image
- toascii - convert an IRIS image to text characters
- tobin - convert an IRIS image to binary dump of pixel data
- tobw - convert an IRIS image to black and white
- togif - convert an IRIS image to a Compuserve GIF image
- tomac - convert an IRIS image to MacPaint format
- tonews - convert an IRIS image into NeWS format
- topict - convert an IRIS image to Macintosh PICT format
- toppm - convert an IRIS image file into Jef Poskanzer's ppm image format
- tops - convert an IRIS image to PostScript
- toscitex - Convert IRIS images into Scitex CT2T images
- tosun - convert an IRIS image to a sun raster file
- totarga - convert an IRIS image to a type 2 targa image
- toyuv - convert an IRIS image to yuv format
-
- The source for each of these tools is shipped in the 4Dgifts
- dev.dev_sw.giftsfull package and placed in the directory
- /usr/people/4Dgifts/iristools/imgtools. Each also has a man page.
-
- Similar tools for more formats (frompict, frompixar, fromtiff,
- fromutah, totiff, toutah and toxbm at last count), as well as some of
- the ones that come with IRIX and a few miscellaneous cool image editing
- tools, are in ftp.sgi.com:/graphics/bin/. 'fromjpeg' and 'tojpeg' can
- be found in explorer.dgp.toronto.edu:/pub/sgi/sgijpeg/.
- swedishchef.lerc.nasa.gov:/ has 'fromvicar' in /image/conversion/from/,
- 'tocolps' and 'topcl' in /image/conversion/to/ and many other image-
- related tools in nearby directories.
-
- Finally, 'imgworks' (in the imgtools.sw.tools subsystem) understands
- RGB, TIFF and FIT formats, and several freeware programs including
- SDSC's 'imtools' (in swedishchef.lerc.nasa.gov:/image/conversion/),
- 'xv' (in ftp.cis.upenn.edu:/pub/xv/) and ImageMagick (in
- ftp.x.org:/contrib/) work on SGIs and understand SGI's RGB format as
- well as many other formats.
-
- ------------------------------
-
- Subject: -46- Can I compress RGB bitmaps?
- Date: 07 May 93 00:00:01 EST
-
- Yes. Use /usr/sbin/rle, which is part of eoe2.sw.imagetools.
-
- ------------------------------
-
- Subject: -47- How do I make a screen dump?
- Date: 27 Jan 94 00:00:01 EST
-
- Use the utilities 'snapshot', 'scrsave' or 'imgsnap'. All have
- manpages. 'snapshot' and 'scrsave' are in the eoe2.sw.gltools
- subsystem, 'imgsnap' is in the imgtools.sw.tools subsystem and their
- manpages are in the respective *.man.* subsystems.
-
- From within a GL program, you should call readdisplay(). For an
- example look at ~4Dgifts/iristools/imgtools/scrsave.c.
-
- ------------------------------
-
- Subjectse 4Dgifts code in my application?
- Date: 07 May 93 00:00:01 EST
-
- Yes. The 4Dgifts are a "gift" and developers are welcome to use the
- code. However, SGI does not support the code in 4Dgifts. Note that
- certain restrictions apply. Please read the copyright statement in
- ~4Dgifts/README.Copyright.
-
- ------------------------------
-
- Subject: -49- What does ERR_WMANIPC mean?
- Date: 07 May 93 00:00:01 EST
-
- The "WMAN" in that message means "window manager." However, this
- no longer means "window manager" such as 4Dwm, but rather the entire
- X Window system. The error means that the GL program triggered a
- fatal X error.
-
- A GL program can get an X error, because all GL programs are actually X
- clients. When a GL program does a winopen(), libgl actually calls
- XCreateWindow, etc.)
-
- When a GL program gets an X error, libgl prints out these X errors
- using this error message:
-
- GL: X request = maj.min, error code = ercode
-
- where
-
- maj = major request code that caused the error
- min = minor request code
- ercode = X error code
-
- This turns out to be easy to interpret, so long as the request was a
- core X protocol request (e.g., a CreateWindow request). In that case:
-
- 1. You can look up the major code in /usr/include/X11/Xproto.h.
- 2. The minor code is not used.
- 3. The X error code can be found in /usr/include/X11/X.h.
-
- As you can see in Xproto.h, the core X protocol requests have request
- codes <= 127.
-
- However, if maj > 127, then the request is an X extension request.
- Unfortunately, it can be difficult to interpret this unless you built
- your program with a debugging libgl.a (compiled with -g). The reason
- is that for an X extension, the major request code and the starting
- error code are copied from the X server during client startup, and
- these codes are saved in variables inside libgl. With a debugging
- libgl, these variables can be printed out from within a debugger, such
- as dbx.
-
- If the major code indicates an X Input extension request, then the
- minor numbers then tell the X input request type, and these are found
- in /usr/include/X11/extensions/XIproto.h.
-
- Finally, the X Input Extension uses 132 as its "starting error code."
- The possible errors are found in /usr/include/X11/extensions/XI.h,
- where they're defined like this:
-
- #define XI_BadDevice 0
- #define XI_BadEvent 1
- #define XI_BadMode 2
- #define XI_DeviceBusy 3
- #define XI_BadClass 4
-
- If you add 132 to these numbers, you get the error that's reported by
- the libgl error message.
-
- ------------------------------
-
- Subject: -50- How can I translate screen (x,y) coords into world
- (x,y,z) coords?
- Date: 07 May 93 00:00:01 EST
-
- Check the manual page for mapw(3G) or mapw2(3G). mapw() returns a line
- into (x,y,z) space.
-
- ------------------------------
-
- Subject: -51- How can I translate world (x,y,z) coords into screen
- (x,y) coords?
- Date: 07 May 93 00:00:01 EST
-
- There are two methods. The first method is detailed in
- ~4Dgifts/examples/grafix/world2scrn.c, which is part of the
- dev.dev_sw.giftsfull package. It multiplies the (x,y,z) vector into
- the current modeling and projection matrixes, and uses the result to
- interpolate based on the window size and position.
-
- The second method uses the current cursor position as a trick and is
- much simpler. Use cmov() to set the cursor position to the point of
- interest in world space, then call getcpos() to return the cursor
- position in screen coordinates. Note that if your entire viewport is
- off-screen, the results are undefined and you'll have to use the first
- method.
-
- float x,y,z;
- short x1, y1;
-
- cmov (x,y,z);
- getcpos (&x1, &y1);
-
- ------------------------------
-
- Subject: -52- I call mapcolor(index, R, G, B) but nothing happens.
- Why?
- Date: 07 May 93 00:00:01 EST
-
- You either need to call glcompat(GLC_SLOWMAPCOLORS, TRUE) at the
- beginning of your program, or call gflush() after calling mapcolor.
-
- See the NOTES section in "man mapcolors" and also "man glcompat" for
- further info. (This may also be in the GL release notes)
-
- ------------------------------
-
- Subject: -53- What's wrong with blink()?
- Date: 10 Jun 93 00:00:01 EST
-
- - blink() is broken all the way up through 4.0.5F, where blink() only
- blinks to black.
-
- - you can work-around this blink() problem by doing the following:
-
- blink(rate, index, red<<8, green<<8, blue<<8)
-
- - ~4Dgifts/examples/glpg/ch04/blinker.c has three main problems:
-
- - it doesn't do the above work-around.
- - it doesn't do a gflush after mapping colors.
- - it doesn't turn blinking off initially.
-
- - what happens is that if a program starts anything blinking and exits
- without ever turning blinking off with blink(-1, 0, 0, 0, 0) then the
- next program to attempt blinking will not be able to blink. this
- happens if for instance you close the blinker window before its 10
- second sleep() has completed.
-
- - a simple idea for a work-around for this problem: programs which do
- blinking should turn their blinking on when they have focus; they
- should turn all blinking off when they lose focus. This is not
- perfect but is a plausible attempt at sharing the 20 blinking
- system-wide colormap entries.
-
- Here is a copy of ~4Dgifts/examples/glpg/ch04/blinker.c that contains
- the above workarounds, except for input-focus:
-
- #include <gl/gl.h>
-
- #define MAXBLINKS 20 /* maximum number of blinking entries */
- #define FIRSTBLINKCI 64 /* avoid the first 64 colors */
-
- main()
- {
- int i;
-
- prefsize(400, 400);
- winopen("blinker");
- ortho2(-0.5, 20.0*MAXBLINKS + 9.5, -0.5, 500.5);
- color(BLACK);
- clear();
-
- /* always turn blinking off before calling 'blink' */
- blink (-1, 0, 0, 0, 0);
-
- for (i = MAXBLINKS - 1; i >= 0 ; i--) {
- mapcolor(i + FIRSTBLINKCI, 255, 255, 255);
- /* always call gflush() after mapcolors() */
- gflush();
- color(i + FIRSTBLINKCI);
- sboxfi(i*20 + 10, 10, i*20 + 20, 490);
- /* GL bug in blink -- must left-shift r,g,b values */
- blink(i + 1, i + FIRSTBLINKCI, 255 << 8, 0 << 8, 0 << 8);
- }
- sleep(10);
- blink(-1, 0, 0, 0, 0); /* stop all blinking */
- gexit();
- return 0;
- }
-
- ------------------------------
-
- Subject: -54- When I try to run UIM/X uxserverd, I get an error
- message saying, "license file has been modified, cannot
- start the UIM/X license server".
- Date: 07 May 93 00:00:01 EST
-
- You probably have been given a bad key. The most frequent causes of
- incorrect keys have been incorrect capitalization and incorrect IP
- addresses.
-
- The program that generates the UIM/X key requires that the "host ID"
- (or IP address) be in hexadecimal format. If you feed it the standard
- form of IP address (i.e., 123.45.678.90) it will generate the wrong key
- and will not complain.
-
- To ensure that you are is giving the correct information when
- requesting a UIM/X key, please do the following:
-
- Hostname: Type in 'hostname' at the prompt, and be sure to say exactly
- what it says (including capitalization, if any).
-
- Host ID: Type in 'hostid' at the prompt, and be sure to say exactly
- what it says. You will be reading back a series of numbers of the form
- 0xc030c844. The leading 0x indicates that the following number is
- hexadecimal.
-
- The key generating script is highly sensitive to capital letters. Make
- sure you confirm the case of the letters, both when getting the
- hostname/hostid and when having your key read back to you.
-
- If this still doesn't fix the problem, you may have mixed files between
- UIM/X 1.0 and 2.0. Completely remove UIM/X, re-install it, and
- reproduce a Uimx2_0.license file with the correct information.
-
- ------------------------------
-
- Subject: -55- What is a GL widget?
- Date: 10 Jun 93 00:00:01 EST
-
- GL widget refers to the GlxDraw (generic) and GlxMDraw (Motif) widgets
- that allow you to embed GL windows in Xt-based programs. To embed a GL
- windows in X-based programs is frequently called "Mixed-model" or "GLX"
- programming.
-
- There are several examples of mixed-model programming in the directory
- /usr/people/4Dgifts/examples/GLX.
-
- ------------------------------
-
- Subject: -56- I'm using the GlxMDraw widget and it doesn't seem that
- colors are being installed correctly. Overlays in the
- GlxMDraw widget are displayed in red and gray instead of
- the colors I specify. What is the problem?
- Date: 10 Jun 93 00:00:01 EST
-
- The window manager must be directed to install all appropriate
- colormaps. Use the XSetWMColormapWindows() call to do this -- list one
- window for each colormap to be installed plus the top level window. If
- using overlays, include the overlay window as well as the normal GL
- window.
-
- If your window is TrueColor, you should still install the appropriate
- colormap, as Indigo TrueColor is simulated using a colormap.
-
- ------------------------------
-
- Subject: -57- I get a "Broken Pipe" error when I close the window of
- an X client, such as xman or xterm. What does this
- error mean? Is there something wrong with my system?
- Date: 10 Jun 93 00:00:01 EST
-
- Typically the error message resembles the following:
-
- XIO: fatal IO error 32 (Broken pipe) on X server ":0.0" after 214
- requests (214 known processed) with 0 events remaining. The connection
- was probably broken by a server shutdown or KillClient.
-
- The Window Manager is reporting that the pipe for your X client has
- been broken. This is normal when an X client exits. There is nothing
- wrong with your system. This message will also occur when the system is
- shut down. This is not an error condition and no core files are
- produced.
-
- ------------------------------
-
- Subject: -58- Is there a way to switch on the fly between single and
- double buffering within a GL widget?
- Date: 10 Jun 93 00:00:01 EST
-
- There is no way to switch between single and double buffered mode
- within the same window. (In X, this would mean changing the depth,
- which is not allowed.)
-
- To simulate this, you can create two GL widgets: a double buffered GL
- widget and a single buffered GL widget. When it is time to change the
- buffering mode, restack the windows so that the appropriate one is on
- top. If the two windows are created with a common parent, they move
- together when the parent is moved.
-
- For non-mixed mode applications, the GL performs this switching when
- you call gconfig().
-
- ------------------------------
-
- Subject: -59- Why doesn't SGI's xlock lock my screen?
- Date: 10 Jun 93 00:00:01 EST
-
- If you or the super-user do not have a password, xlock will not lock.
- Also, in IRIX 4.x, xlock is set up by default to act as if invoked with
- the "-nolock" option, which tells it not to lock the screen. If you
- want force xlock to lock, do either of the following:
-
- a) Use the "+nolock" option when invoking xlock. This means
- "not nolock" (the opposite of "-nolock"). For example:
-
- % xlock +nolock
-
- b) Add the following line to your ~/.Xdefaults file:
-
- XLock.nolock: False
-
- In IRIX 5.x, the default behavior of xlock has been reversed, so xlock
- does indeed lock by default. If you wish to keep the IRIX 4.x
- behavior, invoke xlock with the -nolock option.
-
- ------------------------------
-
- Subject: -60- What about Inventor?
- Date: 10 Dec 93 00:00:01 EST
-
- Gavin Bell <gavin@sgi.com> maintains an Inventor FAQ. It is archived at
- viz.tamu.edu:/pub/sgi/faq/inventor.
-
- Miscellaneous Inventor goodies can be found at
- ftp.sgi.com:/sgi/inventor/. These include a performance guide in
- doc.tar.Z and the release notes for Inventor 2.0 (aka Open Inventor) in
- relnotes.2.0.tar.Z.
-
- ------------------------------
-
- Subject: -61- Why do I get compilation errors when compiling the
- Inventor C++ examples, using C++ 3.0?
- Date: 10 Jun 93 00:00:01 EST
-
- Inventor 1.0 and 1.0.1 were built using the 2.1.1 version of the C++
- compiler. If you are using C++ 3.0, you must add the "-v2" switch to
- the Makefile's LC++OPTS line. It would then look like the following:
-
- # Options to C++; see the CC manual page for what they do LC++OPTS =
- -v2 +p -Wf,-XNp10000
-
- ------------------------------
-
- Subject: -62- Why does the X server sometimes abort when I log out in
- IRIX 5.0.1 and IRIX 5.1?
- Date: 01 Oct 93 00:00:01 EST
-
- BACKGROUND: Both problems are related to resetting of the X server.
- Normally the X server process is spawned by xdm (the X Display
- Manger). The X server process continues to run after every login and
- logout of the graphics head; the server simply resets to its initial
- state every time someone logs out. In X server terminology, the X
- server goes through multiple generations.
-
- PROBLEM 1: The dynamically loadable Display PostScript extension has a
- bug where it does not properly reset the X server state on server reset
- (ie, generations other than the first).
-
- The problem only occurs if you have dps_eoe.sw.xserver_ext (which
- contains /usr/lib/X11/dyDDX/xdps.so which is the dynamically loadable
- Display PostScript extension). dps_eoe is installed by default.
-
- This problem affects all CPUs and graphics hardware.
-
- PROBLEM 2: If the user logs out while any GL-based application (such
- as buttonfly, WorkSpace, jot, etc) is running, the server will not
- reset.
-
- Typically you will find errors in /usr/adm/SYSLOG similar to the
- following:
-
- date host xdm[pid]: IO Error in XOpenDisplay
- date host xdm[pid]: Display :0 cannot be opened
- date host xdm[pid]: Display :0 is being disabled
- date host xdm[pid]: Rescanning both config and servers files
-
- WORKAROUND: As root, edit /usr/lib/X11/xdm/xdm-config and change the
- line
-
- DisplayManager._0.terminateServer: False
-
- to
-
- DisplayManager._0.terminateServer: True
-
- (Please note that the contents of xdm-config are case-sensitive.)
- Then restart the window system (/usr/gfx/stopgfx; /usr/gfx/startgfx)
-
- If the above workaround doesn't work, try setting
-
- DisplayManager._0.startAttempts: 1
-
- to
-
- DisplayManager._0.startAttempts: 4
-
- This change forces xdm to try to start the X server up to four times,
- if the first three fail.
-
- ------------------------------
-
- End of sgi/faq/graphics Digest
- ******************************
- --
- The SGI FAQ group sgi-faq@viz.tamu.edu
- Finger us for info on the SGI FAQs, or look in viz.tamu.edu:/pub/sgi.
-